/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.suli.toHouse.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
* @website https://eladmin.vip
* @description /
* @author wyh
* @date 2024-02-01
**/
@Entity
@Data
@Table(name="receipt_detail")
public class ReceiptDetail implements Serializable {

    @Id
    @Column(name = "`id`")
    @ApiModelProperty(value = "id")
    private String id;

    @Column(name = "`mt_list`")
    @ApiModelProperty(value = "入库单号")
    private String mtList;

    @Column(name = "`ch_no`")
    @ApiModelProperty(value = "采购订单号")
    private String chNo;

    @Column(name = "`el_no`")
    @ApiModelProperty(value = "物料编号")
    private String elNo;

    @Column(name = "`el_name`")
    @ApiModelProperty(value = "物料名称")
    private String elName;

    @Column(name = "`mt_qty`")
    @ApiModelProperty(value = "入库数量")
    private String mtQty;

    @Column(name = "`el_unit`")
    @ApiModelProperty(value = "单位")
    private String elUnit;

    @Column(name = "`mt_area`")
    @ApiModelProperty(value = "入库库位")
    private String mtArea;

    @Column(name = "`wa_no`")
    @ApiModelProperty(value = "工厂")
    private String waNo;

    @Column(name = "`lot_no`")
    @ApiModelProperty(value = "批次号")
    private String lotNo;

    @Column(name = "`pk_list`")
    @ApiModelProperty(value = "箱条号码")
    private String pkList;

    @Column(name = "`pk_qty`")
    @ApiModelProperty(value = "箱号数量")
    private BigDecimal pkQty;

    @Column(name = "`vmi_code`")
    @ApiModelProperty(value = "是否VMI")
    private String vmiCode;

    @Column(name = "`rtd_user`")
    @ApiModelProperty(value = "操作人员")
    private String rtdUser;

    @Column(name = "`receipt_id`")
    @ApiModelProperty(value = "头表id")
    private String receiptId;

    @Column(name = "`receipt_detail_code`")
    @ApiModelProperty(value = "收货明细编码")
    private String receiptDetailCode;

    @Column(name = "`status`")
    @ApiModelProperty(value = "收货明细状态")
    private int status;

    @Column(name = "`create_time`")
    @ApiModelProperty(value = "创建时间")
    private Timestamp creatTime;

    @Column(name = "`el_mkdate`")
    @ApiModelProperty(value = "制造时间")
    private String elMkDate;
    public void copy(ReceiptDetail source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
